how to implement classification in machine learning